home *** CD-ROM | disk | FTP | other *** search
- /*
-
- File: CAS_Dialog.h
-
- Contains: Header for utility routines for dialogs & controls.
-
- Written by: David H Nelson
-
- Copyright © 1988-1995 ComponentWorks, All rights reserved.
-
- Change History (most recent first):
-
- <1> 2/14/95 SJF first checked in
- <1> 1988 DHN Created.
- */
-
- #if !defined(_H_dialogTools)
- #define _H_dialogTools
-
-
- #define bGDF bGenericDialogFilter
-
- typedef struct popupPrivateData {
- MenuHandle mHandle; /* the popup menu handle */
- short mID; /* the popup menu ID */
- /* after these two public fields is the mPrivate private data, */
- /* which may be any old size and should not be messed with */
- }
- popupPrivateData, *popupPrivateDataPtr,**popupPrivateDataHdl;
-
-
- #if defined(__cplusplus)
- extern "C"
- {
- #endif
-
- /*--------------------------------------------------------------------------*/
- /* DialogTools.c */
-
-
- void Dialog_CenterALRT( short ID);
- void Dialog_CenterALRTonFrontWindow( short ID);
- void Dialog_CenterDLOG( short ID);
- void Dialog_CenterDLOGonFrontWindow( short ID);
- Point Dialog_TopLeftCenteredDLOG( short iDLOG);
-
- void Dialog_SetBoldButton( DialogPtr theDialog,short itemNum,short RefID);
- void Dialog_SetCheckBox( DialogPtr theDialog, short checkItem, Boolean bCheckValue);
- Boolean Dialog_GetCheckBox( DialogPtr theDialog, short checkItem);
- void Dialog_ToggleCheckBox( DialogPtr theDialog, short checkItem);
- void Dialog_SetRadioGroup( DialogPtr theDialog, short startItem, short endItem, short activeItem);
- short Dialog_GetRadioGroup( DialogPtr theDialog, short startItem, short endItem);
- Handle Dialog_GetItemHandle( DialogPtr theDialog, short itemNum);
- void Dialog_SetItemHandle( DialogPtr theDialog, short itemNum,Handle theHandle);
- void Dialog_GetItemRect( DialogPtr theDialog, short theID,Rect *theRect);
- void Dialog_SetItemRect( DialogPtr theDialog, short theID,Rect *theRect);
- short Dialog_GetItemKind( DialogPtr theDialog, short theID);
- void Dialog_InvalItemRect( DialogPtr theDialog, short itemNum);
- void Dialog_FrameItem( WindowPtr theWindow, short itemNum);
- void Dialog_GrayLine( WindowPtr theWindow, short itemNum);
- void Dialog_SizeTextItem( DialogPtr theDialog, short itemNum);
- void Dialog_SetTextItem( DialogPtr theDialog, short itemNum,StringPtr string);
- short Dialog_GetIconID( DialogPtr theDialog, short itemNum);
- void Dialog_DrawCenteredStr( WindowPtr theWindow, short itemNum, StringPtr theString);
- void Dialog_OutlineButton( WindowPtr theWindow, short itemNum);
- void Dialog_SetUserProc(DialogPtr theDialog,short itemNum,pascal void (*proc)(WindowPtr theWindow,short itemNum));
- void Dialog_RedrawDialogs(void);
-
- Boolean Dialog_ControlEnabled(ControlHandle theControl);
-
- void Dialog_BlinkControl(ControlHandle theControl);
-
- MenuHandle GetPopUpMenuHandle(ControlHandle thisControl);
- void SetPopUpMenuHandle(ControlHandle thisControl, MenuHandle theMenu);
- short ItemStringToItem(Str255 theItemString, MenuHandle theMenu);
- short FontToMenuItem(short fontFamilyNumber, MenuHandle theMenu);
- short SizeToMenuItem(short theSize, MenuHandle theMenu);
-
-
- pascal Boolean bGenericDialogFilter(DialogPtr theDialog,EventRecord *theEvent,short *itemHit);
- Boolean bDialogFilter(DialogPtr theDialog,EventRecord *theEvent,short *itemHit,
- Boolean (*filterProc)(DialogPtr,EventRecord *,short *));
-
-
- // These were unused
-
- //pascal void pOutlineButton(WindowPtr theWindow,short itemNum);
- //pascal void pFrameItem(WindowPtr theWindow,short itemNum);
- //pascal void pGrayLine(WindowPtr theWindow,short itemNum);
- //pascal void pSizeTextItem(DialogPtr theDialog,short itemNum);
- //pascal void pSetTextItem(DialogPtr theDialog,short itemNum,StringPtr string);
-
-
- #if defined(__cplusplus)
- }
- #endif
-
-
- #endif
-